/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Modele;

import java.awt.Color;
import java.awt.Component;
import javax.swing.JButton;
import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.TableCellRenderer;



/**
 *  The ButtonColumn class provides a renderer and an editor that looks like a
 *  JButton. The renderer  will be used for a specified column
 *  in the table. it's the  TableModel which contains the String to be displayed on
 *  the button.
 *
 
 *
 */
public class ButtonColumn implements TableCellRenderer {        
        
   @Override 
        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
            JButton button = new JButton(value.toString());
            return button;  
        }
    }

        

